package com.itfitness.opengldemo

import android.opengl.GLSurfaceView
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle

class MainActivity : AppCompatActivity() {
    private lateinit var glRender: GLRender
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val glSurfaceView = GLSurfaceView(this)
        glSurfaceView.setEGLContextClientVersion(3)
        glRender = GLRender(this)
        glSurfaceView.setRenderer(glRender)
        setContentView(glSurfaceView)
    }

    override fun onDestroy() {
        super.onDestroy()
        glRender.ndkRelease()
    }
}